export default {
  app: function (key) {
    var localhost = localStorage.getItem('myLocalhost');
    var httpTypeFlag = localStorage.getItem('httpTypeFlag') === "true" ? 'https' : 'http';
    var HTTP_URLS = (localhost ? httpTypeFlag + '://' + localhost : 'https://vwms-uat.cmal.com.cn:8080/cmli-vwms') + '/app/';
    var httpurl = null;

    switch (key) {
      case 'login': httpurl = HTTP_URLS + 'security/login'; break; // 登陆地址
      case 'abnormalInfo': httpurl = HTTP_URLS + 'exceptionType/query'; break; // 登陆-异常类型地址
      case 'warehouseInfo': httpurl = HTTP_URLS + 'warehouseAndCenter/query'; break; // 登陆-仓库和任务中心查询
      case 'homeMeun': httpurl = HTTP_URLS + 'security/modules'; break;// 主页
      case 'setDriverInfo': httpurl = HTTP_URLS + 'driverInfo/query'; break;// 设置页面-司机信息查询
      case 'setStatusChange': httpurl = HTTP_URLS + 'driver/status/update'; break;// 设置页面-状态切换
      case 'setWarehouseChange': httpurl = HTTP_URLS + 'warehouseAndCenter/update'; break;// 设置页面-修改仓库及任务中心
      case 'abnormalUploader': httpurl = HTTP_URLS + 'exception/create'; break;// 异常管理-异常上传地址
      case 'abnormalVinQuery': httpurl = HTTP_URLS + 'exception/vin/query'; break;// 异常管理-vin数据
      case 'pickCarInfo': httpurl = HTTP_URLS + 'task/recievecar/query'; break;// 下线收车-初始化请求
      case 'pickCarVinQuery': httpurl = HTTP_URLS + 'task/recievecar/vinQuery'; break;// 下线收车-VIN请求数据
      case 'pickCarCreate': httpurl = HTTP_URLS + 'task/recievecar/create'; break;// 下线收车-创建
      case 'pickCarDone': httpurl = HTTP_URLS + 'task/recievecar/close'; break;// 下线收车-完成
      case 'setLocation': httpurl = HTTP_URLS + 'location/update'; break;// 库位定位
      case 'inPlace': httpurl = HTTP_URLS + 'entry/update'; break;// 入场
      case 'outPlace': httpurl = HTTP_URLS + 'enter/update'; break;// 出场
      case 'outlibrary': httpurl = HTTP_URLS + 'task/outWarehouse/query'; break;// 出库请求数据主接口
      case 'outlibraryIsReceive': httpurl = HTTP_URLS + 'driverTask/update'; break;// 出库是否领取任务
      case 'outlibraryDone': httpurl = HTTP_URLS + 'task/outWarehouse/close'; break;// 出库确认完成，维修完成，留车维修
      case 'inlibrary': httpurl = HTTP_URLS + 'storage/task/query'; break;// 入库 查询驾驶员入库任务
      case 'inlibraryVin': httpurl = HTTP_URLS + 'storage/vin/update'; break;// 入库 VIN码(取车确认)
      case 'inlibraryUpdate': httpurl = HTTP_URLS + 'storage/driverTask/update'; break;// 入库 拒绝任务/领取任务
      case 'inlibraryConfirm': httpurl = HTTP_URLS + 'storage/confirm'; break;// 入库 确认完成
      case 'trafficCarQuery': httpurl = HTTP_URLS + 'busTask/query'; break;// 交通车查询
      case 'trafficCarDetailQuery': httpurl = HTTP_URLS + 'busTaskDetail/query'; break;// 交通车详细查询
      case 'trafficCarUpdate': httpurl = HTTP_URLS + 'busTask/update'; break;// 交通车更新任务
      case 'moveLibrary': httpurl = HTTP_URLS + 'move/task/query'; break;// 移库
      case 'moveLibraryBunding': httpurl = HTTP_URLS + 'move/worker/bunding'; break;// 移库
      case 'callCarStationSearch': httpurl = HTTP_URLS + 'rideBus/station/queryAll'; break;// 站点查询
      case 'callCarStationCreate': httpurl = HTTP_URLS + 'busRequest/create'; break;// 站点查询
      case 'callCarStationQuery': httpurl = HTTP_URLS + 'busRequest/query'; break;// 第一次查任务
      case 'busUpdate': httpurl = HTTP_URLS + 'bus/update'; break;// 交通车更新
      case 'busNos': httpurl = HTTP_URLS + 'bus/query'; break;// 调度类型-交通车车牌
      case 'busNosCreat': httpurl = HTTP_URLS + 'busWorking/create'; break;// 调度类型-交通车选择
      case 'busNosNoCreat': httpurl = HTTP_URLS + 'busWorking/close'; break;// 调度类型-交通车反选
      case 'transposingQuery': httpurl = HTTP_URLS + 'shift/task/query'; break;// 移位管理
      case 'transposingQueryVin': httpurl = HTTP_URLS + 'shift/worker/bunding'; break;// 移位管理 - vin
      case 'transposingClose': httpurl = HTTP_URLS + 'shift/task/close'; break;// 移位管理 - 完成
      case 'isPickCar': httpurl = HTTP_URLS + 'task/outWarehouse/update'; break;// 出库取车确认
      case 'isPickCarShift': httpurl = HTTP_URLS + 'shift/task/pickConfirm'; break;// 移位取车确认
      case 'maintain': httpurl = HTTP_URLS + 'maintenance/query'; break;// 维护查询
      case 'maintainList': httpurl = HTTP_URLS + 'maintenance/detail/query'; break;// 维护详细
      case 'maintainDone': httpurl = HTTP_URLS + 'maintenance/detail/update'; break;// 维护完成
      case 'inventoryQuery': httpurl = HTTP_URLS + 'count/query'; break;// 盘点查询
      case 'inventoryDetail': httpurl = HTTP_URLS + 'count/detail/query'; break;// 盘点明细
      case 'inventoryUpdate': httpurl = HTTP_URLS + 'count/detail/update'; break;// 盘点确认
      case 'changePasswords': httpurl = HTTP_URLS + 'user/password/update'; break;// 修改密码
      case 'taskQuery': httpurl = HTTP_URLS + 'task/query'; break;// 任务查询
      case 'geoUpdate': httpurl = HTTP_URLS + 'driver/location'; break;// 位置更新
      case 'fill': httpurl = HTTP_URLS + 'ride/driverTask/query'; break;// 补人请求
      case 'fillAction': httpurl = HTTP_URLS + 'ride/driverTask/update'; break;// 补人请求
      case 'fillDone': httpurl = HTTP_URLS + 'ride/driverTask/close'; break;// 补人请求
      case 'taskUpdate': httpurl = HTTP_URLS + 'task/update'; break;// 补人请求

      case 'initTask': httpurl = HTTP_URLS + 'roadfetch/initTask'; break;// 路试取车初始化
      case 'getCar': httpurl = HTTP_URLS + 'roadfetch/getCar'; break;// 路试取车 确认取车
      case 'uploadImg': httpurl = HTTP_URLS + 'roadfetch/uploadImg'; break;// 路试取车 上传图片
      case 'arriveConfirm': httpurl = HTTP_URLS + 'roadfetch/arriveConfirm'; break;// 路试取车 到达确认
      case 'sendStayTime': httpurl = HTTP_URLS + 'roadfetch/sendStayTime'; break;// 路试取车 停留偏移超速
      case 'queryTask': httpurl = HTTP_URLS + 'roadfetch/queryTask'; break;// 路试取车 查询下一个任务
    

      case 'onroadInit': httpurl = HTTP_URLS + 'onroadTask/init'; break;// 在途取车 初始化
      case 'onroadVin': httpurl = HTTP_URLS + 'onroadTask/vin'; break;// 在途取车 扫vin
      case 'onroadPlace': httpurl = HTTP_URLS + 'onroadTask/place'; break;// 在途取车 目的地
      case 'onroadChangeCar': httpurl = HTTP_URLS + 'onroadTask/changeCar'; break;// 在途取车 换车
      case 'onroadWorked': httpurl = HTTP_URLS + 'onroadTask/worked'; break;// 在途取车
      case 'onroadGetSpeed': httpurl = HTTP_URLS + 'onroadTask/getSpeed'; break;// 在途取车 停留便宜超速


      case 'getBol': httpurl = HTTP_URLS + 'shipMark/getBol'; break;// 唛头验证vin
      case 'cheakShipMark': httpurl = HTTP_URLS + 'shipMark/cheakShipMark'; break;// 唛头验证唛头vin

      case 'getMasterBol': httpurl = HTTP_URLS + 'pickCar/getMasterBol'; break;// 提车验证 车牌
      case 'pickCar': httpurl = HTTP_URLS + 'pickCar/pickCar'; break;// 提车验证 vin
      case 'cancelPickCar': httpurl = HTTP_URLS + 'pickCar/cancelPickCar'; break;// 提车验证 取消
      case 'outScan': httpurl = HTTP_URLS + 'pickCar/outScan'; break;// 提车验证 出场确认

      case 'onroadJumppage': httpurl = HTTP_URLS + 'onroadTask/jumppage'; break;// home是否有在途、路试任务

      case 'getAudioToken': httpurl = HTTP_URLS + 'token/query'; break;// home是否有在途、路试任务

      case 'bindRfid': httpurl = HTTP_URLS + 'task/recievecar/bindingRFID'; break;// 下线收车rfid
      case 'locationError': httpurl = HTTP_URLS + 'exceptionType/driverException'; break;// 定位未开启

      case 'odbbluetooth': httpurl = HTTP_URLS + 'odbBluetooth/bluetooth'; break;// 蓝牙
      case 'searchVol': httpurl = HTTP_URLS + 'bluetooth/viewBatteryRecord'; break;// 查看电压
      case 'carAbnormal': httpurl = HTTP_URLS + 'task/recievecar/exceptionCar'; break;// 下线收车 - 车辆异常


      case 'viewWmsTrailerLineUp': httpurl = HTTP_URLS + 'trailer/viewWmsTrailerLineUp'; break;// 排队中：
      case 'viewWmsTrailerEntrance': httpurl = HTTP_URLS + 'trailer/viewWmsTrailerEntrance'; break;// 已入场：
      case 'viewWmsTrailerDetail': httpurl = HTTP_URLS + 'trailer/viewWmsTrailerDetail'; break;// 现场管理：
      case 'returnTaskQuery': httpurl = HTTP_URLS + 'task/outWarehouse/queryBorrowTask'; break;// 借车出库返修任务列表查询
      case 'returnSingleTaskQuery': httpurl = HTTP_URLS + 'task/outWarehouse/getSingleBorrowTask'; break;// 借车出库任务详细查询
      case 'returnGetSingleTask': httpurl = HTTP_URLS + 'task/outWarehouse/dealSingleBorrowTask'; break;// 借车出库领取
      default: httpurl = 'localhost'; break;
    }
    return httpurl + "?&t=" + Date.now();
  }
}